// src/models/user.js
// 用户登录请求DTO
export class LoginRequest {
  constructor(username = '', password = '', email = '', phone = '', status = 1) {
    this.username = username;
    this.password = password;
    this.email = email;
    this.phone = phone;
    this.status = status;
  }
}

// 用户注册请求DTO（根据后端RegisterRequest，需要补充字段）
export class RegisterRequest {
  constructor(username = '', password = '', email = '', phone = '', role = '') {
    this.username = username;
    this.password = password;
    this.email = email;
    this.phone = phone;
    this.role = role;
  }
}

// 用户查询DTO
export class UserQuery {
  constructor(current = 1, size = 10, username = '', email = '', role = '') {
    this.current = current;
    this.size = size;
    this.username = username;
    this.email = email;
    this.role = role;
  }
}

// 角色相关DTO
export class AddRoleRequest {
  constructor(roleName = '', description = '') {
    this.roleName = roleName;
    this.description = description;
  }
}

export class AssignUserRoleRequest {
  constructor(userId = null, roleId = null) {
    this.userId = userId;
    this.roleId = roleId;
  }
}

export class AddPermissionRequest {
  constructor(permissionName = '', resourceUrl = '', method = '', description = '') {
    this.permissionName = permissionName;
    this.resourceUrl = resourceUrl;
    this.method = method;
    this.description = description;
  }
}

export class AssignRolePermissionRequest {
  constructor(roleId = null, permissionId = null) {
    this.roleId = roleId;
    this.permissionId = permissionId;
  }
}